package com.data.modules.log.common;


import lombok.Getter;


/**
 * @author zhangzhiwei
 * crm模块枚举
 */

@Getter
public enum CrmEnum {
    /**
     * 线索
     */
    LEADS(1, "线索"),
    /**
     * 劳动者
     */
    CUSTOMER(2, "意向劳动者"),
    /**
     * 联系人
     */
    CONTACTS(3, "联系人"),
    /**
     * 产品
     */
    PRODUCT(4, "产品"),
    /**
     * 商机
     */
    BUSINESS(5, "商机"),
    /**
     * 合同
     */
    CONTRACT(6, "合同"),
    /**
     * 回款
     */
    RECEIVABLES(7, "回款"),
    /**
     * 回款计划
     */
    RECEIVABLES_PLAN(8, "回款计划"),
    /**
     * 公海
     */
    CUSTOMER_POOL(9, "公海"),
    /**
     * 市场活动
     */
    MARKETING(10, "市场活动"),
    /**
     * 回访
     */
    RETURN_VISIT(17, "劳动者回访"),
    /**
     * 发票
     */
    INVOICE(18, "发票"),

    /**
     * 劳动者
     */
    LEADS_CUSTOMER(20, "线索"),

    CUSTOMER_(2, "线索"),

    CUSTOMER_HISTORY(15,"历史推荐记录");

    CrmEnum(Integer type, String remarks) {
        this.type = type;
        this.remarks = remarks;
    }

    private Integer type;
    private String remarks;

    public static CrmEnum parse(Integer type) {
        for (CrmEnum crmEnum : CrmEnum.values()) {
            if (crmEnum.getType().equals(type)) {
                return crmEnum;
            }
        }
        return null;
    }

    public static CrmEnum parse(String name) {
        for (CrmEnum crmEnum : CrmEnum.values()) {
            if (crmEnum.name().equals(name)) {
                return crmEnum;
            }
        }
        return null;
    }

}
